package com.example.cardserver.controller;

import com.example.cardserver.mapper.OrderMapper;
import com.example.cardserver.service.IOrderService;
import com.example.cardserver.util.JsonResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RequestMapping("order")
@RestController
public class OrderController extends BaseController{
    @Resource
    private IOrderService orderService;

    @RequestMapping(value = "order",method = RequestMethod.POST)
    public JsonResult<Void> order(Integer uid, Integer gid, String addr){
        orderService.order(uid, gid, addr);
        return new JsonResult<>(OK);
    }
}
